package com.example.travelservlet.label.controller;

import com.example.travelservlet.entity.Label;
import com.example.travelservlet.entity.Province;
import com.example.travelservlet.label.service.LabelService;
import com.example.travelservlet.user.domain.Result;
import com.example.travelservlet.utils.ResultUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/label")
public class LabelController {
    @Autowired
    private LabelService labelService;

    @GetMapping("/findLabel")
    public Result<List<Label>> findLabel(){
        List<Label> labels = labelService.findLabels();
        return ResultUtil.success(labels);
    }
}
